package com.imagefake.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;

import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import java.io.IOException;

@Controller
@CrossOrigin
public class ForwardController {
    @Value("${project-web.url}")
    private String webUrl;

    @GetMapping("/web/login")
    public void forwardToWePage(HttpServletRequest request, HttpServletResponse response) throws IOException {
        response.sendRedirect(webUrl+"/login");
    }
}
